import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from "../views/Index.vue"
import Movie from "../views/Movie.vue"
import Cinema from "../views/Cinema.vue"
import BoxOffice from "../views/BoxOffice.vue"
import My from "../views/My.vue"
import Detail from "../views/Detail.vue"
import City from "../components/City.vue"
Vue.use(VueRouter);
const routes = [
    {
      path:"/",
      redirect:{
        name:"Movie"
      },
    },
    {
      path:"/Detail/:id",
      name:"Detail",
      component:Detail
    },
    {
      path:"/City",
      name:"City",
      component:City
    },
    {
      path:"/Index",
      name:"Index",
      component:Index,
      children:[{
        path:"Movie",
        name:"Movie",
        component:Movie,
      },
      {
        path:"Cinema",
        name:"Cinema",
        component:Cinema
      },
      {
        path:"BoxOffice",
        name:"BoxOffice",
        component:BoxOffice
      },
      {
        path:"My",
        name:"My",
        component:My
      },
    ]
    },
]

const router = new VueRouter({
  routes
})

export default router
